package singleton.hungry;
/**
 * 饿汉式单例
 * @author lenovo
 *优点：线程安全，没有使用锁，效率高
 *缺点：产生垃圾实例；
 */
public class HungrySingleton {
	private HungrySingleton() {
	}
	private static final HungrySingleton HUNGRY_SINGLETON=new HungrySingleton();
	public static HungrySingleton getInstance() {
		return HUNGRY_SINGLETON;
	}
}
